How to Create EC2 instance on Amazon Web Service(AWS).
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) Cloud. … You can use Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage.
It stands for Elastic Compute Cloud. It is a web service where an AWS subscriber can request and provision a compute server in AWS cloud. An on-demand EC2 instance is an offering from AWS where the subscriber/user can rent the virtual server per hour and use it to deploy his/her own applications
- Login to aws portal.
- Click on Services.
- Under Compute select EC2.
- Click on Running Instance.
- Click on Launch Instance.
- At Choose an Amazon Machine image, search image as per requirement.(For example: ubuntu 18.04)
- Click on Select.
- Select an Instance type.(select number of vCPUs & memory required)
- Click on Next configure instance details.
- Provide Number of instances required, By default number of instance is one.
- Select Default or existing VPC network.
- Select Subnet.
- Leave the other settings.
- Enable Monitoring for logs.
- If needs file system then click on Add file system.
- Click on Next Add Storage.
- We can increase or decrease volume size as per requirement.
- If needs New volume then click on Add new volume.
- Click on Next Add Tag.
- Provide Key name & value for EC2 instance.
- Click on Next configure security group.
- Assign a new or existing security group.
- Add rule for ec2 instance like HTTP or HTTPs .
- Provide Port number & source IP address.
- Then click on Review & Launch.
- Review instance launch details.
- Click on Launch.
- Create or Select Existing Key Pair.
- If create a new key pair then provide a key pair name.
- Click on Download key pair.
- Click on Launch Instance.
- Instance are now launching state.
- Click on View instance.
- Go to Instance console page.
- EC2 instance is there with the name we provide.
- After sometime instance is running state.
Connect EC2 instance using SSH.
- Go to your system terminal & set the .pem file path on terminal.
For example: cd /Download
- At instance Console Page click on Connect.
- Copy the Public DNS of new instance.
- Run the following command on your terminal.
ssh -i “.pem file” public_dns